<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-10-07 12:32:11
 * @LastEditTime: 2019-10-25 14:41:26
 * @LastEditors: Please set LastEditors
 -->
<template>
  <d2-container better-scroll>
    <userApplicationList :applyList="applyList" :examineDate="false" ref="userApplicationList"/>
    <!-- 尾部页码显示 -->
    <template slot="footer">
     <pagination @getApplyList="getApplyList" :total="total"/>
    </template>
</d2-container>
</template>

<style lang="scss" scoped>
</style>

<script>
import userApplicationList from '@/components/userApplicationList'
import pagination from '@/components/pagination'
import { getUnprocessedUserApplication } from '@/api/userApplication'
export default {
  name: 'unprocessed-userUnprocessed',
  data () {
    return {
      name: '',
      id: 1,
      total: 0,
      current: 1,
      size: 8,
      applyList: []
    }
  },
  components: {
    pagination,
    userApplicationList
  },
  created () {
    this.getApplyList(this.size, this.current)
  },
  methods: {
    getApplyList (size, current) {
      getUnprocessedUserApplication({ pageNum: current, pageSize: size, status: 0 }).then(res => {
        console.log('getUnprocessedUserApplication: ', res)
        this.applyList = res.list
        this.total = res.total
        this.$refs.userApplicationList.loading = false
      }).catch(err => {
        console.log('err', err)
      })
    }
  }
}
</script>
